section .text				;section declaration
                            ;we must export the entry point to the ELF linker or
    global _hello_asm        ;loader. They conventionally recognize _start as their
                            ;entry point. Use ld -e foo to override the default.
_hello_asm:

        enter   0,0               ; setup routine
        pusha


;write our string to stdout
        mov     edx,len     ;third argument: message length
        mov     ecx,msg     ;second argument: pointer to message to write
        mov     ebx,1       ;first argument: file handle (stdout)
        mov     eax,4       ;system call number (sys_write)
        int     0x80	    ;call kernel

;and exit
        popa
        mov     eax, 0            ; return back to C
        leave                     
        ret



section .data				;section declaration

msg     db      "Hola python, soy ensamblador!",0xa	 ;our dear string
len     equ     $ - msg                              ;length of our dear string
